package frontend;
import java.util.List;
import java.util.ArrayList;

public final class CompileErrors extends Exception {
	public List<CompileError> errs;
	public CompileErrors() {
		this.errs = new ArrayList<CompileError>();
	}
	public CompileErrors(List<CompileError> errs) {
		this.errs = errs;
	}
	public void addError(CompileError err) {
		this.errs.add(err);
	}
	public void addError(String msg, int lineNumber) {
		CompileError err = new CompileError(msg, lineNumber);
		this.errs.add(err);
	}
	public void clear() {
		errs.clear();
	}
	public int size() {
		return errs.size();
	}
}
